package main

import (
	"fmt"
	"log"
	"net/http"
)

type FileHandler struct {
	FileName string
}

func (handler FileHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	log.Printf("Serving %s ...", handler.FileName)
	http.ServeFile(w, r, handler.FileName)
}

type Handler struct {
}

func (handler Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	log.Println(r.URL.String())
	if r.URL.Path != "/" {
		http.NotFoundHandler().ServeHTTP(w, r)
		return
	}
	w.Header().Set("Content-Type", "text/plain")
	fmt.Fprintln(w, "Hello, I am SS-Camera.")
}
